package com.boxuegu.boxueguapiservice.service.impl;

import com.boxuegu.boxueguapiservice.dao.QuestionMapper;
import com.boxuegu.boxueguapiservice.entity.Question;
import com.boxuegu.boxueguapiservice.service.QuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @author Vincent
 */
@Service("questionMapperService")
public class QuestionImpl implements QuestionService {
  @Autowired
  private QuestionMapper mapper;
  
  @Override
  public Question findOneByUserNameAndAnswer(Map<String, Object> map) {
    return mapper.findOneByUserNameAndAnswer(map);
  }
  
  @Override
  public void forgetUserPassword(Integer id) {
    mapper.forgetUserPassword(id);
  }
  
  @Override
  public int savaQuestion(Question question) {
    return mapper.savaQuestion(question);
  }
  
  @Override
  public int updateQuestion(Question question) {
    return mapper.updateQuestion(question);
  }
}
